<%@page import="edu.cqupt.dao.Book"%>
<%@page import="java.util.List"%>
<%@page import="java.sql.ResultSet"%>
<%@page import="java.sql.Statement"%>
<%@page import="java.sql.DriverManager"%>
<%@page import="java.sql.Connection"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
	<div align="center">
		<h1>全部图书</h1>
		<table border="1">
			<tr>
				<th>图书id</th>
				<th>图书名</th>
				<th>操作</th>
			</tr>
			<%
				List<Book> bookList = (List<Book>)request.getAttribute("bookList");
				for (Book book : bookList) {
			%>
			<tr>
				<td><%= book.getBookId()%></td>
				<td><%= book.getBookName()%></td>
				<td>
					<a href='get_book_details?book_id=<%= book.getBookId()%>'>查看详情</a>&nbsp;&nbsp;&nbsp;
					<a href='get_book_info?book_id=<%= book.getBookId()%>'>修改图书</a>
				</td>
			</tr>
			<%
				}
			%>

		</table>
	</div>
</body>
</html>